import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
  state: () => ({
    users: [],
    currentUser: null
  }),
  actions: {
    async fetchUsers() {
      const response = await fetch('http://localhost:3000/api/users');
      this.users = await response.json();
    }
  }
});